Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ISound3D Class Reference

ISound3D is the interface for 3D sound objects. More...

#include <IAudio.h>

Inheritance diagram for ISound3D::

IPlayable IAudioBase List of all members.

Public Methods

virtual bool Init (const Sound3DInit &init)=0
virtual bool SetProperties (const Sound3DProp &prop)=0
virtual bool GetProperties (Sound3DProp &prop) const=0
virtual bool SetPosition (const AUDIOVECTOR &vPosition)=0
virtual bool GetPosition (AUDIOVECTOR &vPosition) const=0
virtual bool SetVelocity (const AUDIOVECTOR &vVelocity)=0
virtual bool GetVelocity (AUDIOVECTOR &vVelocity) const=0
virtual bool SetMaxDistance (float fMaxDist)=0
virtual bool GetMaxDistance (float &fMaxDist) const=0
virtual bool SetMinDistance (float fMinDist)=0
virtual bool GetMinDistance (float &fMinDist) const=0
virtual bool SetConeAngles (uint32 nInside, uint32 nOutside)=0
virtual bool GetConeAngles (uint32 &nInside, uint32 &nOutside) const=0
virtual bool SetConeOrientation (const AUDIOVECTOR &vOrientation)=0
virtual bool GetConeOrientation (AUDIOVECTOR &vOrientation) const=0
virtual bool SetConeOutsideVolume (float fVolume)=0
virtual bool GetConeOutsideVolume (float &fVolume) const=0
virtual bool SetMode (uint32 nMode)=0
virtual bool GetMode (uint32 &nMode) const=0
virtual bool SetVolume (float fVolume)=0
virtual bool GetVolume (float &fVolume) const=0
virtual bool SetPitch (float fPitch)=0
virtual bool GetPitch (float &fPitch) const=0
virtual bool SetReadCursor (uint32 nBytes)=0
virtual bool GetReadCursor (uint32 &nBytes) const=0
virtual bool GetSourceSize (uint32 &nBytes) const=0
virtual IEAXBufferEAX ()=0
virtual IZoomFXZoomFX ()=0
virtual bool QuerySupport (const GUID &guid, uint32 nID, uint32 *pTypeSupport)=0
virtual bool Get (const GUID &guidProperty, uint32 nID, void *pInstanceData, uint32 nInstanceLength, void *pPropData, uint32 nPropLength, uint32 *pBytesReturned)=0
virtual bool Set (const GUID &guidProperty, uint32 nID, void *pInstanceData, uint32 nInstanceLength, void *pPropData, uint32 nPropLength, bool bStoreProperty)=0

Detailed Description

ISound3D is the interface for 3D sound objects.

ISound3D-derived objects represent sounds located in 3D world or local space. The ISound3D interface provides specific initalization routines and 3d functions, as well as functions for setting the read cursor position and getting the source size.


Member Function Documentation

IEAXBuffer * ISound3D::EAX ( ) [pure virtual]
 

Retrieves the IEAXBuffer interface. The function is guaranteed never to fail, so there is no need to check the interface pointer for null.

Returns:
The IEAXBuffer interface is returned.
See also:
IEAXBuffer

bool ISound3D::Get ( const GUID & guidProperty,
uint32 nID,
void * pInstanceData,
uint32 nInstanceLength,
void * pPropData,
uint32 nPropLength,
uint32 * pBytesReturned ) [pure virtual]
 

This function allows an application to get property set information from a driver. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Returns:
true indicates success, false indicates failure.
See also:
QuerySupport(), Set()

bool ISound3D::GetConeAngles ( uint32 & nInside,
uint32 & nOutside ) const [pure virtual]
 

Gets the inside and outside cone angles of the sound. Paramater values are in degrees, and valid ranges are 0 to 360.

Parameters:
nInside   is the inside angle in degrees.
nOutside   is the outside angle in degrees.
Returns:
true indicates success, false indicates failure.
See also:
SetConeAngles()

bool ISound3D::GetConeOrientation ( AUDIOVECTOR & vOrientation ) const [pure virtual]
 

Gets the orientation of the sound cone.

Parameters:
vOrientation   is the orientation of the sound.
Returns:
true indicates success, false indicates failure.
See also:
SetConeOrientation()

bool ISound3D::GetConeOutsideVolume ( float & fVolume ) const [pure virtual]
 

Gets the volume outside the sound cone.

Parameters:
fVolume   gets the outside cone volume. Valid range is from AUD_VOLUME_MIN to AUD_VOLUME_MAX.
Returns:
true indicates success, false indicates failure.
See also:
SetConeOutsideVolume()

bool ISound3D::GetMaxDistance ( float & fMaxDist ) const [pure virtual]
 

Gets the maximum distance at which a sound can be heard.

Parameters:
fMaxDist   is distance to get in world units.
Returns:
true indicates success, false indicates failure.
See also:
SetMaxDistance()

bool ISound3D::GetMinDistance ( float & fMinDist ) const [pure virtual]
 

Gets the minimum distance at which a sound begins to attenuate with distance.

Parameters:
fMinDist   is distance to get in world units.
Returns:
true indicates success, false indicates failure.
See also:
SetMinDistance()

bool ISound3D::GetMode ( uint32 & nMode ) const [pure virtual]
 

Sets the 3D sound processing mode.

Parameters:
nMode   is the processing mode. See SetMode() for possible values.
Returns:
true indicates success, false indicates failure.
See also:
SetMode()

bool ISound3D::GetPitch ( float & fPitch ) const [pure virtual]
 

Gets the objects frequency in hertz

Returns:
true indicates success, false indicates failure.
See also:
SetPitch()

bool ISound3D::GetPosition ( AUDIOVECTOR & vPosition ) const [pure virtual]
 

Retrieves the current position of the sound source.

Parameters:
vPosition   gets the position in 3D space.
Returns:
true indicates success, false indicates failure.
See also:
SetPosition()

bool ISound3D::GetProperties ( Sound3DProp & prop ) const [pure virtual]
 

Gets all 3D properties simultaneously.

Parameters:
prop   is a structure holding all 3d properties.
Returns:
true indicates success, false indicates failure.
See also:
Set3DProperties()

bool ISound3D::GetReadCursor ( uint32 & nBytes ) const [pure virtual]
 

Gets the current read cursor position in bytes.

Parameters:
nBytes   will be the number of bytes from the beginning of the source.
Returns:
true indicates success, false indicates failure.
See also:
SetReadCursor()

bool ISound3D::GetSourceSize ( uint32 & nBytes ) const [pure virtual]
 

Retrieves the total size of the current source in bytes.

Parameters:
nBytes   total size retrieved of the source in bytes.
Returns:
true indicates success, false indicates failure.

bool ISound3D::GetVelocity ( AUDIOVECTOR & vVelocity ) const [pure virtual]
 

Retrieves the current velocity of the sound source.

Parameters:
vPosition   gets the velocity in 3D space.
Returns:
true indicates success, false indicates failure.
See also:
SetVelocity()

bool ISound3D::GetVolume ( float & fVolume ) const [pure virtual]
 

Gets the volume for this audio object.

Parameters:
fVolume   retrieves the current object's volume
Returns:
true indicates success, false indicates failure.
See also:
SetVolume()

bool ISound3D::Init ( const Sound3DInit & init ) [pure virtual]
 

Initializes the 2D sound parameters. This must be the first function called on the sound after the object is created.

Parameters:
init   is the initialization structure for 2D sounds, containing pamrameters needed to create the sound.
Returns:
true indicates success, false indicates failure.
See also:
Sound3DInit, Destroy()

bool ISound3D::QuerySupport ( const GUID & guid,
uint32 nID,
uint32 * pTypeSupport ) [pure virtual]
 

Generic property support (for driver-specific extensions). Querying an object allows a program to determine if driver-specific extensions are available on a user's system. By exposing this at the API level, it ensures that the application has complete control over any property sets needed at the application level. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Returns:
true indicates success, false indicates failure.
See also:
Get(), Set()

bool ISound3D::Set ( const GUID & guidProperty,
uint32 nID,
void * pInstanceData,
uint32 nInstanceLength,
void * pPropData,
uint32 nPropLength,
bool bStoreProperty ) [pure virtual]
 

This function allows an application to set a driver-specific property. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Parameters:
bStoreProperty   This specific audio extention tells the audio object to store this property setting and automatically restore the setting when an object is unloaded, and then reloaded.
Returns:
true indicates success, false indicates failure.
See also:
Get(), QuerySupport()

bool ISound3D::SetConeAngles ( uint32 nInside,
uint32 nOutside ) [pure virtual]
 

Sets the inside and outside cone angles of the sound. Paramater values are in degrees, and valid ranges are 0 to 360.

Parameters:
nInside   is the inside angle in degrees.
nOutside   is the outside angle in degrees.
Returns:
true indicates success, false indicates failure.
See also:
GetConeAngles()

bool ISound3D::SetConeOrientation ( const AUDIOVECTOR & vOrientation ) [pure virtual]
 

Sets the orientation of the sound cone.

Parameters:
vOrientation   is the orientation of the sound.
Returns:
true indicates success, false indicates failure.
See also:
GetConeOrientation()

bool ISound3D::SetConeOutsideVolume ( float fVolume ) [pure virtual]
 

Sets the volume outside the sound cone.

Parameters:
fVolume   sets the outside cone volume. Valid range is from AUD_VOLUME_MIN to AUD_VOLUME_MAX.
Returns:
true indicates success, false indicates failure.
See also:
GetConeOutsideVolume()

bool ISound3D::SetMaxDistance ( float fMaxDist ) [pure virtual]
 

Sets the maximum distance at which a sound can be heard.

Parameters:
fMaxDist   is distance to set in world units.
Returns:
true indicates success, false indicates failure.
See also:
GetMaxDistance()

bool ISound3D::SetMinDistance ( float fMinDist ) [pure virtual]
 

Sets the minimum distance at which a sound begins to attenuate with distance.

Parameters:
fMinDist   is distance to set in world units.
Returns:
true indicates success, false indicates failure.
See also:
GetMinDistance()

bool ISound3D::SetMode ( uint32 nMode ) [pure virtual]
 

Sets the 3D sound processing mode.

Parameters:
nMode   is the processing mode. Possible values are:
  • DS3DMODE_DISABLE: 3D processing is disabled. Sound appears to originate from the listener's head.
  • DS3DMODE_HEADRELATIVE: All 3D parameters are relative to the listener's position and orientation.
  • DS3DMODE_NORMAL: This is the standard, default mode. All 3D parameters are in absolute world coordinates.
Returns:
true indicates success, false indicates failure.
See also:
GetMode()

bool ISound3D::SetPitch ( float fPitch ) [pure virtual]
 

Sets the desired frequency of the audio object relative to its original frequency. For instance, a value of 0.5 sets it to half the original pitch, and a value of 2.0 doubles the pitch. Note that the pitch range may be constained by the sample's original pitch and the range allowed in hardware.

Returns:
true indicates success, false indicates failure.
See also:
GetPitch()

bool ISound3D::SetPosition ( const AUDIOVECTOR & vPosition ) [pure virtual]
 

Sets the current position of the sound source.

Parameters:
vPosition   sets the position in 3D space.
Returns:
true indicates success, false indicates failure.
See also:
GetPosition()

bool ISound3D::SetProperties ( const Sound3DProp & prop ) [pure virtual]
 

Sets all 3D properties simultaneously.

Parameters:
prop   contains all 3d properties to set.
Returns:
true indicates success, false indicates failure
See also:
GetProperties()

bool ISound3D::SetReadCursor ( uint32 nBytes ) [pure virtual]
 

Sets the current read cursor position in bytes in the current source.

Parameters:
nBytes   sets the number of bytes from the beginning of the source.
Returns:
true indicates success, false indicates failure.
See also:
GetReadCursor()

bool ISound3D::SetVelocity ( const AUDIOVECTOR & vVelocity ) [pure virtual]
 

Sets the current velocity of the sound source.

Parameters:
vPosition   sets the velocity in 3D space.
Returns:
true indicates success, false indicates failure.
See also:
GetVelocity()

bool ISound3D::SetVolume ( float fVolume ) [pure virtual]
 

Sets the individual volume of a 3D sound. This value will decrease the volume in addition to any decrease from maximum volume set in the master volume controls.

Parameters:
fVolume   sets the volume desired
Returns:
true indicates success, false indicates failure.
See also:
GetVolume()

IZoomFX * ISound3D::ZoomFX ( ) [pure virtual]
 

Retrieves the IZoomFX interface. The function is guaranteed never to fail, so there is no need to check the interface pointer for null.

Returns:
The IZoomFX interface is returned.
See also:
IZoomFX


The documentation for this class was generated from the following file:
Generated at Sun Jul 28 23:17:42 2002 for GAP Audio System by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001